Function |unwrap_or
std/ops/option::|unwrap_or
Usage
|unwrap_or<T>(option, default)
Generics
◻ T (any)
Parameters
↳ option: Option<T>
↳ default: T
Return
↴ T
Return the contained value if option is some, or default if it is none.
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
std/ops/option::|unwrap_or
|unwrap_or<T>(option, default)
◻ T (any)
↳ option: Option<T>
↳ default: T
↴ T
Return the contained value if option is some, or default if it is none.